#include "MainWidget.h"
#include "widgetlogin.h"
#include <QApplication>
#include <QFile>
#include <QPushButton>

void loadStyleSheet(const QString &filePath) {
    QFile file(filePath);
    if (file.open(QFile::ReadOnly | QFile::Text)) {
        QTextStream stream(&file);
        qApp->setStyleSheet(stream.readAll());
        file.close();
    } else {
        qWarning("Unable to open the style sheet file.");
    }
}

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    a.setWindowIcon(QIcon("://main.ico"));
    loadStyleSheet("://blue_style.css"); // 替换为你实际的路径


    WidgetLogin login;
    MainWidget w;

    login.setDialog(&w);
    w.setDialog(&login);

    login.show();

    //w.show();
    return a.exec();



}
